<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core" template="/template.xhtml">

	<ui:define name="content">
		<s:validateAll>
			<h:form enctype="multipart/form-data">
				<h:panelGrid columns="2">
					<h:outputLabel value="Name" for="txt_name" />
					<h:inputText id="txt_name" value="#{newPhoto.name}" required="true"
						requiredMessage="Ad zorunludur!" />
					<h:outputLabel value="File" for="flu_dosya" />
					<s:fileUpload id="flu_dosya" data="#{newPhoto.data}" />
				</h:panelGrid>
				<h:commandButton action="#{photoService.createNewPhoto(newPhoto)}"
					value="Create" />
			</h:form>
		</s:validateAll>
	</ui:define>

</ui:composition>
